# -*- mode: snippet -*-
# name: doxygen function generator
# key: fdoxy
# --
`(let ((args (find-arg-list)))
  (insert (concat "/**\n"
                  (format " ** %s " (cdr (assoc 'function args)))))
  (insert "${1:<long description>}\n**\n")
  (when (cdr (assoc 'args args))
    (mapcar (function (lambda (x)
                      (insert (concat "** @param "
		      	      	      (format "%s " (extract-argument-name x))
				      "${2:<param description>}\n"))))
          (cdr (assoc 'args args))))
  (unless (string= "void" (cdr (assoc 'return args)))
    (insert " ** @return <ReturnValue>\n"))
  (insert " **/\n"))`
